package com.xbongbong.pro.formula.pojo.dto;

import com.xbongbong.paas.field.FormulaPoJo;
import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import com.xbongbong.pro.form.pojo.RuleTargetPojo;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;

/**
 * 校验业务规则的公式设置的是否正确
 * @author 吴峰
 * @version v1.0
 * @date 2020/5/27 16:26
 * @since v1.0
 */
@Getter
@ToString
@Setter
public class ValidateFormulaDTO extends BaseDTO {

    private static final long serialVersionUID = 8601133715432059085L;

    @NotNull(message = "{dto.msg.formId.NotNull}")
    private Long formId;
    @NotNull(message = "{dto.msg.saasMark.NotNull}")
    private Integer saasMark;
    @NotNull(message = "{dto.msg.businessType.NotNull}")
    private Integer businessType;

    private String attr;

    private Integer fieldType;

    @Valid
    private RuleTargetPojo ruleTarget;

    @Valid
    private FormulaPoJo formula;
}
